package com.jdz.gxq.info.admin.landinfo.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.jdz.gxq.info.admin.landinfo.bo.Landinfo;
import com.jdz.gxq.info.admin.landinfo.form.EditLandinfoForm;
import com.jdz.gxq.info.admin.landinfo.service.LandinfoService;
import com.jdz.gxq.info.common.action.CommonAction;

public class EditLandinfoAction extends CommonAction {

	private LandinfoService landinfoService = null;
	 
	public ActionForward doExecute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws java.lang.Exception {
		
		EditLandinfoForm editLandinfoForm = (EditLandinfoForm) form;
	
		Landinfo landinfo = landinfoService.getLandinfoById(editLandinfoForm.getId());
		
		editLandinfoForm.setLandinfo(landinfo);

		return mapping.findForward("success");
	}

	public void setLandinfoService(LandinfoService landinfoService) {
		this.landinfoService = landinfoService;
	}
}

